import config from 'config';
import httpFetch from 'share/httpFetch';

export default {
  //条件查询供应商
  getVenInfoByOptions(params){
    return httpFetch.post(`${config.baseUrl}/vendor-info-service/api/ven/info`,params)
  },

  //新增供应商
  addNewSupplier(params){
    return httpFetch.post(`${config.baseUrl}/vendor-info-service/api/ven/info/insert`,params)
  },

  //供应商信息详情
  getSupplierDetail(id){
    return httpFetch.get(`${config.baseUrl}/vendor-info-service/api/ven/info/${id}`)
  },

  //供应商银行信息
  getSupplierBankInfo(params, roleType){
    return httpFetch.post(`${config.baseUrl}/vendor-info-service/api/ven/bank${roleType}`,params)
  },

  //更新供应商信息详情
  updateSupplierInfo(params, roleType){
    return httpFetch.post(`${config.baseUrl}/vendor-info-service/api/ven/info/update${roleType}`,params)
  },

  //供应商银行信息增加更新
  updateSupplierBank(params, roleType){
    return httpFetch.post(`${config.baseUrl}/vendor-info-service/api/ven/bank/update${roleType}`,params)
  },

  //停用供应商银行账户
  disableSupplierBank(params, roleType){
    return httpFetch.post(`${config.baseUrl}/vendor-info-service/api/change/bank/type${roleType}`,params)
  }
}
